home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1444_determining_release_version.rtf < prev    next >
Text File  |  1993-11-08  |  2KB  |  28 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f3\fmodern Ohlfs;}
  2. \paperw11360
  3. \paperh6960
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  How can I tell which version of the system my application is running under?  In particular, how can I tell whether my application is running under Release 2 or 3? \
  8. \
  9. A:  This can be useful to know, for example, you have a Release 2-compiled application that would like to conditionally take advantage of Release 3 features, or you have some bug-workaround code necessary for Release 2 that you don't want executed when your application runs under Release 3.\
  10. \
  11. You
  12. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fc1\cf1  can do this through various means—
  13. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 for a specific piece of functionality, you might want to directly ask the object in question.  For example, you could use 
  14. \b objc_getClass
  15. \b0 () to determine if the NXHelpPanel class exists, or you could query an NXImage to see if it responds to 
  16. \b imagePasteboardTypes
  17. \b0 : before trying to access its Release 3 functionality.\
  18. \
  19. To get the version number of the Application Kit as a whole, you can ask the Application class for its 
  20. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\b\fc1\cf1 version
  21. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b0\fc1\cf1 .  For Release 3.0, it was incremented to two, previously, it was one.\
  22. \
  23. QA848\
  24. \
  25. Valid for 1.0, 2.0, 3.0\
  26. \
  27.  
  28.